CHAPTER FOUR: Searching catalog files DiskTracker offers quite a few choices when it comes to searching for files. There is a standard, single-criteria, Finder-style searching mechanism which allows you to search on almost twenty different kinds of criteria. The individual “hits” (the items that are found), can be either shown one at a time in the catalog window, all at once in the catalog window, or in the search result window (as described in chapter five). In addition to the simple searching described above, DiskTracker can execute multi parameter searches. This allows you to, rather than simply searching for items using a single criterium (e.g., ‘Name is “Fruit Salad”’), search for items based on what is called an “item filter”. Basically, an item filter is a collection of criteria which describe an item. For instance, an item filter might contain the criteria, ‘Name contains “Egg Nog” AND attribute is alias’. Item filters can essentially contain an infinite number of criteria (of course, the limiting factors are always disk and RAM storage), and contain grouped criteria, as well as the AND, OR, and XOR Boolean operators. Item filters can be saved to disk, so you can construct filters for those searches that you do frequently, and always have quick access to them. DiskTracker also contains a powerful duplicate item finding facility. You can choose which item criteria determine a duplicate file, and can also specify an item filter that files must match before they will be considered as a potential duplicate file. Single-criteria searching DiskTracker features a simple single-criteria searching engine which most users will find more than sufficient for the bulk of searching. Although only one criteria may be checked at a time, almost twenty different kinds of criteria are offered. • To execute a single-criteria search: 1.) Select “Find…” from the Search menu (or press ⌘F). You will be presented with the Find dialog:   2.) Select the criteria you would like to search on from the menu on the left. For a list of the criteria and what they do, see below. 3.) Select the how the criteria should be matched (e.g., contains, is equal to, is less than, and so forth) from the menu on the right. 4.) Enter the search value or select it from the menu in the center (method depends on the search criteria). See below for more info. 5.) Select whether DiskTracker should search all disks, the current hierarchy, or just selected items from the “Search:” menu within the dialog. 6.) From the “Show:” menu, select how you would like DiskTracker to display the found items. You can choose between having the first item selected, all of the items selected, or the items displayed in the search result window (for more on the search result window, see the next chapter). 7.) Click the “Find” button to start the search, or the “Cancel” button to cancel. About the search criteria (limitations and data entry methods in parentheses): • Name—search on an item’s name (fill in the name field) • Size—search on an item’s size (for disks, this is the content size (content = total—free)) (fill in the size field (in kilobytes)) • Kind—search on an item’s kind (fill in the kind field) • Label—search on an item’s Finder label (select from list of labels) • Type—search on a file’s four letter type code (never finds volumes or folders) (fill in file type or click on the “Get From File” button and select a file within the open dialog) • Creator—search on a file’s four letter creator code (never finds volumes or folders) (fill in file creator or click on the “Get From File” button and select a file within the open dialog) • Creation date—search on the date that an item was created on (click on the month, day, and year then use arrow buttons to select the date) • Modification date—search on the date that an item was late modified (select date using same method for creation date) • Attribute—search on several different attributes including (is the item locked?, is the item invisible?, an alias?, a volume?, an archive?, a file?, and does the item have an obsolete disk label?) — select the attribute that you like to search on from the menu • Depth—search on how deep an item is within the hierarchy (disks are of depth 1) (fill in the depth) • # of children—search on how many items there are within the first level of an folder or disk’s hierarchy (never finds files (except archives)) (fill in the number of children) • # of descendants—search on how many items there are within the entire hierarchy of a folder or disk, including the hierarchies within that folder or disk, and the ones inside of that, and so on (never finds files (except archives)) (fill in the number of descendants) • Scanned date—search on the date that a disk was last scanned (never finds folders or files) (select date using same method for creation date) • Labeled date—search on the date that a disk was last labeled (never finds folders or files) (select date using same method for creation date) • Disk notes—search on the notes for a disk (entered through the Disk Notes dialog) (never finds folders or files) (fill in the text field) • Free space—search on the free space on a disk (never finds folders or files) (fill in the size in kilobytes) • Serial number—search on the disk’s serial number (never finds folders or files) (fill in the serial number field) • Parent’s name—search on the name of an item’s parent (never finds volumes) (fill in the name field) • Ancestor’s name—search on the name of an item’s ancestor (never finds volumes) (fill in the name field) Multi-criteria searching (searching with filters) For more complicated searches, DiskTracker offers an extremely powerful multiple parameter searching system. To use this system, the user must define an item filter to use (or select a saved filter). Item filters can contain unlimited criteria and offers grouping as well as the AND, OR, and XOR binary operations. • To find items using item filters: 1.) Select “Find Using Filter…” from the Search menu (or press ⌘E). You will be presented with the Find Using Filter dialog:   2.) Select an item filter from the filter pop up menu or choose the “”. (editing item filters is covered below) 3.) Select whether DiskTracker should search all disks, the current hierarchy, or just selected items from the “Search:” menu within the dialog. 4.) From the “Show:” menu, select how you would like DiskTracker to display the found items. You can choose between having the first item selected, all of the items selected, or the items displayed in the search result window (for more on the search result window, see the next chapter). 5.) Click the “Find” button to start the search, or “Cancel” to cancel. NOTE—The “untitled filter” is a temporary item filter which will be lost when DiskTracker quits. You can use the untitled filter for item filters that you do not wish to be saved on the disk. If you would like to saved the untitled filter to disk, you can use the “Save As…” filter management button (see below). Managing item filters Any of the following steps can be issued from a dialog box which has the item filter management controls (includes the “Find Using Filter” dialog, the “Find Duplicate Files” dialog, or the “File List Filter” dialog (described later)). • To create a new filter: 1.) Within a filter management dialog, click on the “New…” button. 2.) Enter a name for the filter into the name dialog. 3.) You will be presented with the filter editor dialog. See below for info on the filter editor. 4.) Be sure to click “OK” to exit the editor, or else the filter will not be saved. • To save a filter as a different name: 1.) With the appropriate filter selected in a filter management dialog, click on the “Save As…” button. 2.) Enter the name that the filter is to be saved as. 3.) Click on the “OK” button to save the filter, or “Cancel” to abort. • To delete a filter: 1.) With the filter to be deleted selected in a filter management dialog, click on the “Delete…” button. 2.) DiskTracker will ask you to confirm your choice to delete the item. Click “Delete” to delete the filter or “Cancel” to abort. • To edit a filter: 1.) With the filter to be deleted selected in a filter management dialog, click on the “Edit…” button. 2.) You will be presented with the filter editor dialog. See below for info on the filter editor. 3.) Be sure to click “OK” to exit the editor, or else the filter will not be saved. The filter editor After you enter the filter editor (either by creating a new filter or by clicking the “Edit” button), you will be presented with a dialog, called the filter editor dialog, which has a large scrolling list of all of the criteria which make up the item filter (this list will, of course, be empty if the filter is new). To build the item filter, you need to create, group, and set relations for criteria within this dialog box.   • To create a new filter criteria: 1.) Click on the “Insert…” button within the item filter editor. You will be presented with a dialog which resembles the top half of the single criteria search dialog. 2.) Select the criteria you would like to search on from the menu on the left. For a list of the criteria and what they do, see the list above. 3.) Select the how the criteria should be matched (e.g., contains, is equal to, is less than, etc.) from the menu on the right. 4.) Enter the search value or select it from the menu in the center (method depends on the search criteria). See above for more info. 5.) Click “OK” to add item to filter or “Cancel” to abort. If a criteria was selected when “Insert…” was clicked, the new criteria will be added before that one. Otherwise, the new criteria will be added to the end. • To edit an item once it is in the criteria list: 1.) Select the item you like to edit. 2.) Click on the “Edit…” button. Alternatively, you may double click on the item that you would like to edit. 3.) Select the criteria you would like to search on from the menu on the left. For a list of the criteria and what they do, see the list above. 4.) Select the how the criteria should be matched (e.g., contains, is equal to, is less than, etc.) from the menu on the right. 5.) Enter the search value or select it from the menu in the center (method depends on the search criteria). See above for more info. 6.) Click “OK” to lock in the changes to the filter or “Cancel” to abort. • To remove an item from the criteria list: 1.) Click on the criteria (or criteria you would like to remove). Shift-click to select more than one item. 2.) Click on the “Delete” button. The criteria or criteria will be removed from the list. About binary operators A binary operator takes two true/false values and combines them into a single true/false value. The combination method depends on the operator. Binary operators are necessary within item filters because they define how the individual criteria combine to determine whether an item is a “hit”. The three binary operators offered by DiskTracker are: • AND—returns true if any only if, the two criteria being compared are both true. • OR—returns true if either or both of the two criteria being compared are true. • XOR (exclusive OR)—returns true if either of the two criteria being compared are true, but not if BOTH are true. Whenever a new criteria is created, it by default uses the AND operator. • To changing the binary operator for a filter criterium: 1.) Click the item on the line which contains the operator to be changed. Each operation compares items on the line that the operator is on and the following line. 2.) Select a new operator from the pop up menu. About grouping If you would like certain criteria to evaluated before others, you can group them into a single criterium. Groups are shown in the filter criteria list within a pair of brackets (‘[’ and ‘]’), one at the beginning and one at the end of the group. If no groups are present, the criteria are evaluated and combined from the first to the last (i.e., left to right). If groups are present, the groups are evaluated into one truth value first, then the items are combined from first to last (as if the group were a single criterium). It is possible to nest groups (i.e., have a group inside of another group). • To group two or more criteria: 1.) Select the criteria in the list. Shift-clicking allows you to select more than one criteria. 2.) If the “Group” button is enabled, the items may be grouped. Click on the “Group” button to group the criteria. • To ungroup criteria: 1.) Select the criteria within the list which make up a group. 2.) If the “Ungroup” button is enabled, the items are indeed in a group and may be ungrouped. Click on the “Ungroup” button to ungroup the items. Automatic item filter creation DiskTracker has an automatic item filter generation system—given a selected item, the generator will produce an item filter based on the characteristics of that file. You can choose which criteria to base this filter on as well as where to store the filter (either in a new filter or in the untitled filter). • To set the automatic filter generator options: 1.) Select “Auto Filter Options…” from the Search menu. You will be presented with the Auto Filter Options dialog:   2.) Check the criteria that you would like the filter to include. 3.) Choose whether you would like the generator to save the new filter or to just put it into the untitled filter. 4.) Click “OK” to lock in your choices or “Cancel” to abort. • To produce an item filter automatically: 1.) Select the item that you would like the filter to be based on. 2.) Select “Make Filter From Item” from the Search menu (or press ⌘T). An item filter containing the specified criteria will be created and saved into either the untitled filter or into a filter with the same name as the item (as chosen in the Auto Filter Options dialog). Finding duplicate items DiskTracker includes a powerful duplicate items finding system. This system will search for all files which are identical in several different user-specifiable criteria. For instance, if the duplicate file locator is set to locate files by name and size, any two or more files which have the same name and size will be “hits”. In addition, an item filter can be used to reduce the pool of files which are to be examined for duplicates. • To set the criteria which must be matched for a file to be considered the duplicate of another: 1.) Select “Duplicate Item Criteria…” from the Search menu. You will be presented with the Duplicate Item Criteria dialog:   2.) Check the criteria which you would like to have matched for a file to be considered the duplicate of another. 3.) Click “OK” to lock in your settings or “Cancel” to abort. • To search for duplicate files: 1.) Select “Find Duplicate Items…” from the Search menu. You will be presented with the Find Duplicate Items dialog:   2.) If you would like to use an item filter to reduce the number of items examined, select the filter from the pop-up menu. You can also use the filter management controls to create new filters, edit filters, save filters, and delete filters, as described above. 3.) Select whether DiskTracker should search all disks, the current hierarchy, or just selected items from the “Search:” menu within the dialog. 4.) Click the “Find” button to start the search or “Cancel” to cancel.